import { Allow, IsDate, IsDateString, IsInt, IsNotEmpty, IsNumber, Length, MaxLength, Min } from "class-validator";
import BaseEntity from "./BaseEntity";
import { Type } from "class-transformer";
export default class TestPaperEntity extends BaseEntity {

  // @IsNotEmpty({ message: '用户的班级不能为空' })
  public 'class_id': string

  public 'id': string

  @Length(3, 20)
  public 'title': string

  @MaxLength(255)
  public 'desc': string

  @Type(() => String)
  @IsNotEmpty()
  @Length(13)
  public 'start_time': string // 开始时间

  @IsInt()
  @Type(() => Number)
  @IsNotEmpty()
  public 'exam_time_long': number // 考试时长

  // @IsInt()
  @Type(() => String)
  @IsNotEmpty({ message: '截止时间不能为空' })
  @Length(13)
  public 'stop_time': string // 截止时间

  @Type(() => Array)
  public 'questions': object
}